<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<meta name="decorator" content="common" />
	<script src="http://pv.sohu.com/cityjson?ie=utf-8"></script> 
<script>
		$(function(){
			
			var scrollLock=0;
			var p=2;
			var venderTypePhoneValue=$("#venderTypePhone").attr("value"); //原厂为1，品牌厂为2
			var storeTypePhoneValue=$("#storeTypePhone").attr("value"); //自营为1，三方为2
			var carBarandPhoneValue = $('#carBarandPhone').attr("value");
			var carBarandNamePhoneValue = $('#carBarandNamePhone').attr("value");
			$(window).scroll(function() {    
		     if ($(this).scrollTop() + window.innerHeight + 20 >= $(document).height() && $(this).scrollTop() >20) {
				  $("#loadingTips").show(); 
				  if(scrollLock==0){
					  scrollLock=1;
					  $.post(
							  "${ctxWeb}/searchGoods/selectPhoneList",
							  {
								  "p":p,
								  "venderType":venderTypePhoneValue,
								  "storeType":storeTypePhoneValue,
								  "carBarand":carBarandPhoneValue,
								  "carBarandName":carBarandNamePhoneValue,
								  "carCodeValue":carCodeValue,
								  "carYearValue":carYearValue
							  },
							  function(e){
								if(e.length<50){
									$("#loadingTips").text("已无更多数据")
								}else{
									$("#downList").append(e);
									scrollLock=0;
									p = p+1;
								}
				  	});
				 }
		      }  
		  }); 
			
			
			
		 	$(".parts_search_list i").click(function(){
				if($(this).hasClass('search_chose_hover')){
				 	$(this).removeClass('search_chose_hover');
				}else{
				 	$(this).addClass('search_chose_hover');
				}
				var vv=$('.parts_search_list i').index($(this));		
				$(".numRadio").find('input').eq(vv).click();
			});
			
			$(".theme-popover-mask").click(function(){
				$(".parts_search_phone_info").removeClass("on_active")
				$(".theme-popover-mask").hide();
				$(".select_option").hide();
				$('body').css('overflow','auto');
			})
		
			$(".menu_fist .parts_search_phone_item").click(function(){
				$(this).parent().find(".parts_search_phone_info ").removeClass('on_active');
				$(this).find(".parts_search_phone_info ").addClass("on_active");
				$(".theme-popover-mask").show();
				showIndex=$(this).index();
				$(".select_option").hide();
				$(".select_option").eq(showIndex).show();
			})
			$('.cancle').on('click',function(){
	        	$('#showBox').hide();
			})
			$(".select_option.menu_option a").click(function(){
				//$('#phoneFactory').text(this.text);
			});
			
			$("#selectCarBarand").change(function(){
				if(this.value!=""){
					var param="barandCode="+this.value;
					$.ajax({
						url:"${ctxWeb}/searchGoods/getCarCodeByBarand?"+param,
						success:function(result){
							$("#selectCarCode").empty();
							$("#selectCarCode").append("<option value='' >请选择车型</option>");
							$("#selectCarYear").empty();
							$("#selectCarYear").append("<option value=''>请选择年份</option>");
							for(var i=0,len=result.length;i<len;i++){
								$("#selectCarCode").append("<option value='"+result[i]+"'>"+result[i]+"</option>");
							}
							
						}
					});
				}
			});
			$("#selectCarCode").change(function(){
				if(this.value!=""){
					var param="code="+this.value;
					$.ajax({
						url:"${ctxWeb}/searchGoods/getCarYearByCode?"+param,
						success:function(result){
							$("#selectCarYear").empty();
							$("#selectCarYear").append("<option value=''>请选择年份</option>");
							for(var i=0,len=result.length;i<len;i++){
								$("#selectCarYear").append("<option value='"+result[i]+"'>"+result[i]+"</option>");
							}
							
						}
					});
				}
			});
			$("#isVender").find('input').click(function(){
				checkSearchParams();
			});
			
			$("#shopType").find('input').click(function(){
				checkSearchParams();
			});
			$("#showGoods").find('input').click(function(){
				checkSearchParams();
			});
			//改变选中样式
			function checkBoxFunc(inputBox){
				var me=inputBox.find("i");
				if(me.hasClass('search_chose_hover')){
					me.removeClass('search_chose_hover');
				 }else{
					 me.addClass('search_chose_hover');
				 }
			};
			var isVenderValue=$("#isVenderValue").val(); //原厂为1，品牌厂为2
			var shopTypeValue=$("#shopTypeValue").val(); //自营为1，三方为2
			var haveGoodsValue=$("#isgoodsNum").val();//是否有货
			var carBarandValue=$("#carBarandValue").val();//车辆品牌
			var carCodeValue=$("#carCodeValue").val();//车辆型号
			var carYearValue=$("#carYearValue").val();//车辆年份
			if(isVenderValue=="12"){
				checkBoxFunc($("#oldFactory"));
				checkBoxFunc($("#venderFactory"));
				$('#oldFactoryChek').attr("checked",'checked');
				$('#venderFactoryChek').attr("checked",'checked');
			}else if(isVenderValue=="1"){
				//原厂
				checkBoxFunc($("#oldFactory"));
				$('#oldFactoryChek').attr("checked",'checked');
				
			}else if(isVenderValue=="2"){
				//品牌厂
				checkBoxFunc($("#venderFactory"));
				$('#venderFactoryChek').attr("checked",'checked');
			}
			if(shopTypeValue=="12"){
				checkBoxFunc($("#selfSale"));
				checkBoxFunc($("#otherSale"));
				$('#selfSaleCheck').attr("checked",'checked');
				$('#otherSaleCheck').attr("checked",'checked');
			}else if(shopTypeValue=="1"){
				//原厂
				checkBoxFunc($("#selfSale"));
				$('#selfSaleCheck').attr("checked",'checked');
			}else if(shopTypeValue=="2"){
				//品牌厂
				checkBoxFunc($("#otherSale"));
				$('#otherSaleCheck').attr("checked",'checked');
			}
			if(haveGoodsValue=="1"){
				checkBoxFunc($("#haveGoods"));
				$('#haveGoodsCheck').attr("checked",'checked');
			}
			if(carBarandValue!=""){
				$("#selectCarBarand").find("option[value='"+carBarandValue+"']").attr("selected",true);
			}
			if(carCodeValue!=""){
				$("#selectCarCode").find("option[value='"+carCodeValue+"']").attr("selected",true);
			}
			if(carYearValue!=""){
				$("#selectCarYear").find("option[value='"+carYearValue+"']").attr("selected",true);
			}
			
			//手机端
			var venderTypePhoneValue=$("#venderTypePhone").val(); //原厂为1，品牌厂为2
			var storeTypePhoneValue=$("#storeTypePhone").val(); //自营为1，三方为2
			var carBarandNamePhoneValue = $("#carBarandNamePhone").val();
			if(venderTypePhoneValue=="12"){
				$('#phoneFactory').text("所有");
			}else if(venderTypePhoneValue=="1"){
				$('#phoneFactory').text("原厂");
			}else if(venderTypePhoneValue=="2"){
				$('#phoneFactory').text("品牌厂");
			}
			if(storeTypePhoneValue=="12"){
				$('#phoneStore').text("所有");
			}else if(storeTypePhoneValue=="1"){
				$('#phoneStore').text("自营");
			}else if(storeTypePhoneValue=="2"){
				$('#phoneStore').text("第三方");
			}
			if (carBarandNamePhoneValue != "") {
				$('#phoneCarBarand').text(carBarandNamePhoneValue);
			}
			$('#classesNav').addClass("on");
		});
		//PC端搜索
		function searchCar(){
			checkSearchParams();
		};
		//pc拼接查询参数
		function checkSearchParams(){
			var result="";
			var venderLen=$("#isVender").find('input').length;
			if(venderLen>0){
				result="venderType="+result;
			}
			for(var i=0;i<venderLen;i++){
				if($("#isVender").find('input')[i].checked){
					result=result+$("#isVender").find('input')[i].value;
				}
			}
			var shopLen=$("#shopType").find('input').length;
			if(shopLen>0){
				result=result+"&storeType=";
			}
			for(var i=0;i<shopLen;i++){
				if($("#shopType").find('input')[i].checked){
					result=result+$("#shopType").find('input')[i].value;
				}
			}
			if($("#showGoods").find('input')[0].checked){
				result=result+"&isgoodsNum="+$("#showGoods").find('input')[0].value;
			}
			var carBarand=$("#selectCarBarand").val();
			var carCode=$("#selectCarCode").val();
			var carYear=$("#selectCarYear").val();
			var searchContent=$("#searchGoodsContent").val();
			var classId=$("#classIdValue").val();
			if(carBarand!=""){
				result=result!=""?result+"&carBarand="+carBarand:result+"carBarand="+carBarand;
			}
			if(carBarand!=""&&carCode!=""){
				result=result+"&carCode="+carCode;
			}
			if(carBarand!=""&&carCode!=""&&carYear!=""){
				result=result+"&carYear="+carYear;
			}
			if(searchContent!=""&&searchContent!="请输入搜索关键字"){
				result=result+"&searchContent="+searchContent;
			}
			if(classId!=""){
				result=result+"&classId="+classId;
			}
			window.location.href = "${ctxWeb}/searchGoods/getListByParam?"+result;
		};
		//手机端
		function searchVender(type){
			$("#venderTypePhone").val(type);
			checkPhoneSearchParams();
		}
		
		function searchIsself(type){
			$("#storeTypePhone").val(type);
			checkPhoneSearchParams();
		}
		
		function checkPhoneSearchParams(){
			var result="";
			var venderTypePhoneValue=$("#venderTypePhone").attr("value"); //原厂为1，品牌厂为2
			var storeTypePhoneValue=$("#storeTypePhone").attr("value"); //自营为1，三方为2
			var carBarandPhoneValue = $('#carBarandPhone').attr("value");
			var carBarandNamePhoneValue = $('#carBarandNamePhone').attr("value");
			if(venderTypePhoneValue!=null&&venderTypePhoneValue!=''){
				result="venderType="+venderTypePhoneValue;
			}
			if(storeTypePhoneValue!=null&&storeTypePhoneValue!=''){
				result=result!=""?result+"&storeType="+storeTypePhoneValue:result+"storeType="+storeTypePhoneValue;
			}
			if (carBarandPhoneValue != null && carBarandPhoneValue != '') {
				result = result != "" ? result + "&carBarand="
						+ carBarandPhoneValue + "&carBarandName="
						+ carBarandNamePhoneValue : result + "carBarand="
						+ carBarandPhoneValue + "&carBarandName="
						+ carBarandNamePhoneValue;
			}
			window.location.href = "${ctxWeb}/searchGoods/getListByParam?"+result;
		}
		
		function phoneChooseCarBarand(code,name){
			$('#carBarandPhone').val(code);
			$('#carBarandNamePhone').val(name);
			checkPhoneSearchParams();
		}
		
		function searchGoodsFunc(){
			checkSearchParams();
		}
		function addShoppingCart(store_code,goods_code){
			$.ajax({
				url : "${ctxWeb }/shoppingCart/addShoppingCart",
				data:{storeCode:store_code,goodsCode:goods_code},
				success : function(result) {
					if(result!=null){
						if(result.status=='0'){
							$('#showBoxTitle').text('商品不存在,请刷新页面');
							$('#showBox').show();
						}else if(result.status=='2'){
							$('#showBoxTitle').text('商品库存不足');
							$('#showBox').show();
						}else if(result.status=='2'){
							$('#showBoxTitle').text('商品已下架');
							$('#showBox').show();
						}else{
							$('#showBoxTitle').text('商品已成功加入购物车');
							$('#showBox').show();
						}
					}else{
						$('#showBoxTitle').text('系统异常');
						$('#showBox').show();
					}
				}
			});
			event.cancelBubble=true;
			return false;
		}
		function detailFunc(goodsCode,storeCode,showTab){
			window.location.href = "${ctxWeb}/goodsDetail/list?goodsCode="+goodsCode+"&storeCode="+storeCode+"&useIp="+returnCitySN["cip"]+"&showTab="+showTab;
		}
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
	    	return false;
		}
    	</script>
</head>
<body>

	<!--4line-->
	<div class="four_line"></div>
	<!--4line结束-->
	<!--主题内容-->
	<div class="parts_main_box">
		<div class="container">
			<div class="row">
				<!--目录-->
				<div class="menu_box clearfix">
					<p class="info_menu">
						<input type="hidden" value="${params.classId}" id="classIdValue">
						<b>全部结果 ></b><span>${className}${params.searchContent}</span>
					</p>
					<p class="search_menu">
						<input id="searchGoodsContent" type="text" placeholder="请输入搜索关键字"
							class="menu_input" value="${params.searchContent}" /> <a
							onclick="searchGoodsFunc()" class="search_btn_bd">搜索</a>
					</p>
				</div>
				<!--目录结束-->
				<!--搜索条件头部-->
				<div class="parts_search">
					<div class="parts_search_item clearfix">
						<aside>配件制造商:</aside>
						<span class="parts_search_list col-sm-2" id="oldFactory"> <i
							class="search_chose"></i> <em>原厂</em>
						</span> <span class="parts_search_list col-sm-2" id="venderFactory">
							<i class="search_chose"></i> <em>品牌厂</em>
						</span> <input id="isVenderValue" value="${params.venderType}"
							type="hidden" />
						<div class='numRadio' id="isVender" style="display: none;">
							<input type='checkbox' id="oldFactoryChek" name='num' value='1' />
							<input type='checkbox' id="venderFactoryChek" name='num'
								value='2' />
						</div>
					</div>
					<div class="parts_search_item clearfix">
						<aside>其他筛选项:</aside>
						<span class="parts_search_list col-sm-2" id="selfSale"> <i
							class="search_chose"></i> <em>自营门店</em>
						</span> <span class="parts_search_list col-sm-2" id="otherSale"> <i
							class="search_chose"></i> <em>第三方门店</em>
						</span> <span class="parts_search_list col-sm-2" id="haveGoods"> <i
							class="search_chose"></i> <em>仅显示有货</em>
						</span> <input id="shopTypeValue" value="${params.storeType}"
							type="hidden" />
						<div class='numRadio' id="shopType" style="display: none;">
							<input type='checkbox' name='num1' id="selfSaleCheck" value='1' />
							<input type='checkbox' name='num1' id="otherSaleCheck" value='2' />
						</div>
						<input id="isgoodsNum" value="${params.isgoodsNum}" type="hidden" />
						<div class='numRadio' style="display: none;" id="showGoods">
							<input type='checkbox' id="haveGoodsCheck" name='num1' value='1' />
						</div>
					</div>

					<div class="parts_search_info clearfix">
						<div class="col-sm-10 pad0">
							<figure class="col-sm-4 parts_search_msg">
								<div class="form-group clearfix">
									<label class="parts_search_left"> <img
										src="${ctxWebStatic}/images/pp.png" alt="" />
									</label>
									<div class="parts_search_right col-sm-9">
										<input id="carBarandValue" value="${params.carBarand}"
											type="hidden"> <select class="form-control hy1"
											id="selectCarBarand">
											<option value="">请选择品牌</option>
											<c:forEach items="${carBarandList}" var="carBarand">
												<option value="${carBarand.carBarandCode}">${carBarand.carBarand}</option>
											</c:forEach>
										</select>
									</div>
								</div>
							</figure>
							<figure class="col-sm-4 parts_search_msg">
								<div class="form-group clearfix">
									<label class="parts_search_left"> <img
										src="${ctxWebStatic}/images/car.png" alt="" />
									</label>
									<div class="parts_search_right col-sm-9">
										<input id="carCodeValue" value="${params.carCode}"
											type="hidden"> <select class="form-control hy1"
											id="selectCarCode">
											<option value="">请选择车型</option>
											<c:forEach items="${carCodeList}" var="carCode">
												<option value="${carCode}">${carCode}</option>
											</c:forEach>
										</select>
									</div>
								</div>
							</figure>
							<figure class="col-sm-4 parts_search_msg">
								<div class="form-group clearfix">
									<label class="parts_search_left"> <img
										src="${ctxWebStatic}/images/time.png" alt="" />
									</label>
									<div class="parts_search_right col-sm-9">
										<input id="carYearValue" value="${params.carYear}"
											type="hidden"> <select class="form-control hy1"
											id="selectCarYear">
											<option value="">请选择年份</option>
											<c:forEach items="${carYearList}" var="carYear">
												<option value="${carYear}">${carYear}</option>
											</c:forEach>
										</select>
									</div>
								</div>
							</figure>
						</div>
						<figure class="col-sm-2 search_btn_info">
							<a href="javascript:void(0)" onclick="searchCar()">搜索</a>
						</figure>
					</div>
				</div>
				<!--搜索条件头部结束-->
				<!--手机端搜索-->
				<div class="parts_search_phone clearfix">
					<div class="menu_fist">
						<figure class="col-xs-4 parts_search_phone_item">
							<div class="parts_search_phone_info" id="phoneFactory">所有</div>
						</figure>
						<figure class="col-xs-4 parts_search_phone_item">
							<div class="parts_search_phone_info" id="phoneStore">所有</div>
						</figure>
						<figure class="col-xs-4 parts_search_phone_item">
							<div class="parts_search_phone_info" id="phoneCarBarand">车型筛选</div>
						</figure>
					</div>
					<div class="yb_menu">
						<input id="venderTypePhone" value="${params.venderType}"
							type="hidden" />
						<div class="select_option menu_option" id="phoneFactorySelect">
							<a onclick="searchVender('12')">所有</a> <a
								onclick="searchVender('1')">原厂</a> <a
								onclick="searchVender('2')">品牌厂</a>
						</div>
						<input id="storeTypePhone" value="${params.storeType}"
							type="hidden" />
						<div class="select_option menu_option" id="phoneShopSelect">
							<a onclick="searchIsself('12')">所有</a> <a
								onclick="searchIsself('1')">自营</a> <a
								onclick="searchIsself('2')">第三方</a>
						</div>
						<input id="carBarandPhone" value="${params.carBarand}"
							type="hidden" /> <input id="carBarandNamePhone"
							value="${params.carBarandName}" type="hidden" />
						<div class="select_option menu_option" id="phoneCarSelect">
							<c:forEach items="${carBarandList}" var="carBarand">
								<a onclick="phoneChooseCarBarand('${carBarand.carBarandCode}','${carBarand.carBarand}')">${carBarand.carBarand}</a>
							</c:forEach>
						</div>
						<div class="theme-popover-mask top130"></div>
					</div>
				</div>
				<!--手机端搜索结束-->
				<!--商品列表-->
				<div class="parts_goods_box parts_goods_box_pc">
					<c:choose>
						<c:when test="${not empty page.list}">
							<c:forEach items="${page.list}" var="goods">
								<c:if test="${goods.storeStock>0}">
									<figure class="parts_goods_item clearfix">
										<div class="parts_goods_item_img pad0">
											<a onclick="detailFunc('${goods.goodsCode}','${goods.storeCode}','')"> <img
												src="${ctxWeb}/web/file/getFile?filePath=${goods.imgList[0]}" alt="" />
											</a>
										</div>
										<div class="parts_goods_list clearfix">
											<div class="parts_goods_item_mid col-xs-6 pad0">
												<h4 class="title">
													<b>${fns:getDictLabel(goods.storeType, 'store_type', '')}</b>
													<span class="noWrapEllipsis parts_title" title="${goods.cnName}">${goods.cnName}</span>
												</h4>
												<p>
													<em>配件编号：</em> <span>${goods.partCode}</span>
												</p>
												<p>
													<em>门店 ：</em> <span>${goods.storeName}${goods.partCode}</span>
												</p>
												<p>
													<em>适用车型 ：</em> 
													<span class="noWrapEllipsis w_200">${goods.carList[0]}</span>
													<c:if test="${fn:length(goods.carList)>1}">
														<span class="more"> <a onclick="detailFunc('${goods.goodsCode}','${goods.storeCode}','tab2')">更多 ></a>
														</span>
													</c:if>

												</p>
											</div>
											<div class="parts_goods_item_right col-xs-6 pad0">
												<ul class="price clearfix">
													<li>¥ ${goods.price}</li>
													<li class="price_right">
														<p>制造商：${goods.venderName}</p>
														<p class="user_price">会员价：
															<c:choose>
																<c:when test="${not empty user.userType&&user.userType==2}">
																	¥${goods.vipPrice}
																</c:when>
																<c:otherwise>
																	会员可见
																</c:otherwise>
															</c:choose>
														</p>
													</li>
												</ul>
												<p class="text-center goods_btn">
													<a href="${ctxWeb }/shoppingCart/buyNow?storeCode=${goods.storeCode}&goodsCode=${goods.goodsCode }" class="go_buy">立即购买</a> 
													<a onclick="addShoppingCart('${goods.storeCode}','${goods.goodsCode }')" href="javascript:;" class="enter_shopping">加入购物车</a>
												</p>

											</div>
										</div>
									</figure>
								</c:if>
								<c:if test="${goods.storeStock==0}">
									<div id="noGoods">
										<figure class="parts_goods_item clearfix">
											<div class="parts_goods_item_img pad0">
												<a href="javascript:void(0)"> <img
													src="${ctxWeb}/web/file/getFile?filePath=${goods.imgList[0]}" alt="" />
												</a>
												<p class="pos_goods">暂时无货</p>
											</div>
											<div class="parts_goods_list clearfix">
												<div class="parts_goods_item_mid col-xs-6 pad0">
													<h4 class="title">
														<b>${fns:getDictLabel(goods.storeType, 'store_type', '')}</b>
														<span class="noWrapEllipsis parts_title" title="${goods.cnName}">${goods.cnName}</span>
													</h4>
													<p>
														<em>配件编号：</em> <span>${goods.partCode}</span>
													</p>
													<p>
														<em>门店 ：</em> <span>${goods.storeName}</span>
													</p>
													<p>
														<em>适用车型 ：</em> 
														<span class="noWrapEllipsis w_200">${goods.carList[0]}</span>
														<c:if test="${fn:length(goods.carList)>1}">
															<span class="more"> <a onclick="detailFunc('${goods.goodsCode}','${goods.storeCode}','tab2')">更多 ></a>
															</span>
														</c:if>
													</p>
												</div>
												<div class="parts_goods_item_right col-xs-6 pad0">
													<ul class="price clearfix">
														<li class="red">¥ ${goods.price}</li>
														<li class="price_right">
															<p>制造商：${goods.venderName}</p>
															<p>会员价：
																<c:choose>
																	<c:when test="${not empty user.userType&&user.userType==2}">
																		¥${goods.vipPrice}
																	</c:when>
																	<c:otherwise>
																		会员可见
																	</c:otherwise>
																</c:choose>
															</p>
														</li>
													</ul>
													<p class="text-center goods_btn">
														<%-- <a href="${ctxWeb }/shoppingCart/buyNow?storeCode=${goods.storeCode}&goodsCode=${goods.goodsCode }" class="go_buy">立即购买</a> 
														<a href="${ctxWeb }/shoppingCart/addShoppingCart?storeCode=${goods.storeCode}&goodsCode=${goods.goodsCode }" class="enter_shopping">加入购物车</a>--%>
														<a class="go_buy">立即购买</a> 
														<a class="enter_shopping">加入购物车</a>
													
													</p>
												</div>
											</div>
										</figure>
									</div>
								</c:if>
							</c:forEach>
						</c:when>
						<c:when test="${empty page.list&&not empty params.searchContent}">  
							<div class="result_box result_search_box">
								<img src="${ctxWebStatic}/images/att_error.png" alt="" />
								<span>抱歉，没有找到”<b>${params.searchContent}</b>”相关商品信息</span>
							</div> 
						</c:when>
						<c:otherwise>
							<div class="result_box result_search_box">
								<img src="${ctxWebStatic}/images/att_error.png" alt="" /> <span>抱歉，没有找到相关商品信息</span>
							</div>
						</c:otherwise>
					</c:choose>
				<!--商品列表结束-->
				<form:form id="searchForm" modelAttribute="notice" action="${ctxWeb}/goodsList/list" method="post" class="">
					<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
					<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
				</form:form>
				<div class="pagination">${page}</div>
				</div>
				<!--手机端列表-->
				<div class="parts_goods_box parts_goods_box_ph">
					<div id="downList">
					<c:choose>
						<c:when test="${not empty phoneGoodsList}">
							<c:forEach items="${phoneGoodsList}" var="goods">
								<c:if test="${goods.storeStock>0}">
									<figure class="parts_goods_item clearfix" onclick="detailFunc('${goods.goodsCode}','${goods.storeCode}','')">
										<div class="parts_goods_item_img pad0">
											<a href="javascript:void(0)"> 
												<img src="${ctxWeb}/web/file/getFile?filePath=${goods.imgList[0]}" alt="" />
											</a>
										</div>
										<div class="parts_goods_list clearfix">
											<div class="parts_goods_item_mid_ph col-xs-12 pad0">
												<h4 class="title">
													<b>${fns:getDictLabel(goods.storeType, 'store_type', '')}</b>
													<span class="noWrapEllipsis parts_title">${goods.cnName}</span>
												</h4>
												<p class="gry">
													<em>配件编号：</em> <span>${goods.partCode}</span>
												</p>
												<p class="hy_price">¥ ${goods.price}</p>
												<p class=" red ph_hy_mush">
													<span>会员价：
														<c:choose>
															<c:when test="${not empty user.userType&&user.userType==2}">
																¥${goods.vipPrice}
															</c:when>
															<c:otherwise>
																会员可见
															</c:otherwise>
														</c:choose>
													</span> 
													<a href="javascript:void(0)" class="enter_shopping text-center"  onclick="addShoppingCart('${goods.storeCode}','${goods.goodsCode }')">加入购物车</a>
												</p>
											</div>
										</div>
									</figure>
								</c:if>
								<c:if test="${goods.storeStock==0}">
									<figure class="parts_goods_item clearfix">
										<div class="parts_goods_item_img pad0">
											<a href="javascript:void(0)"> <img
												src="${ctxWeb}/web/file/getFile?filePath=${goods.imgList[0]}" alt="" />
											</a>
											<p class="pos_goods">暂时无货</p>
										</div>
										<div class="parts_goods_list clearfix">
											<div class="parts_goods_item_mid_ph col-xs-12 pad0">
												<h4 class="title">
													<b>${fns:getDictLabel(goods.storeType, 'store_type', '')}</b>
													<span class="noWrapEllipsis parts_title">${goods.cnName}</span>
												</h4>
												<p class="gry">
													<em>配件编号：</em> <span>${goods.partCode}</span>
												</p>
												<p class="red">¥ ${goods.price}</p>
												<p class="hy_price ph_hy_mush">
													<span>会员价：
														<c:choose>
															<c:when test="${not empty user.userType&&user.userType==2}">
																¥${goods.vipPrice}
															</c:when>
															<c:otherwise>
																会员可见
															</c:otherwise>
														</c:choose>
													</span>
													<a class="enter_shopping text-center">加入购物车</a>
												</p>
											</div>
										</div>
									</figure>
								</c:if>
							</c:forEach>
						</c:when>
						<c:when test="${empty page.list&&not empty params.searchContent}">  
							<div class="result_box result_search_box">
								<img src="${ctxWebStatic}/images/att_error.png" alt="" />
								<span>抱歉，没有找到”<b>${params.searchContent}</b>”相关商品信息</span>
							</div> 
						</c:when>
						<c:otherwise>
							<div class="result_box result_search_box">
								<img src="${ctxWebStatic}/images/att_error.png" alt="" /> <span>抱歉，没有找到相关商品信息</span>
							</div>
						</c:otherwise>
					</c:choose>
					</div>
					<p style='text-align:center;padding:0.5rem 0;display:none;' id='loadingTips'>正在加载...</p>
				</div>
				<!--手机端列表结束-->
			</div>
		</div>
	</div>
	<!--主题内容-->
	<div class="jd_tk jd_tk_del_box" id="showBox" style="display: none;">
	    <div class="delet_box">
	        <div class="jd_win_tit" id="showBoxTitle"></div>
	        <div class="jd_btn clearfix">
	            <a href="javascript:void(0)" class="cancle">返回</a>
	            <a href="${ctxWeb }/shoppingCart" class="submit" >查看购物车</a>
	        </div>
	    </div>
	</div>
</body>

</html>
